package cc.mrbird.plan.service;

import cc.mrbird.common.domain.QueryRequest;
import cc.mrbird.plan.domain.CheckListType;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

@CacheConfig(cacheNames = "CheckTypeService")
public interface CheckTypeService {
    List<CheckListType> findAllList(CheckListType checkListType, QueryRequest request);

    CheckListType findByName(String asset_type_name);

    @CacheEvict(allEntries = true)
    void add(CheckListType checkListType);

    @CacheEvict(key = "#p0", allEntries = true)
    void update(CheckListType checkListType);

    @CacheEvict(key = "#p0", allEntries = true)
    void delete(String ids);

    @Cacheable(key = "#p0")
    public CheckListType findById(Long id);
}
